package com.yazi.mxz.common.service;

import java.util.List;

import com.myframework.smhj.common.exception.MyException;
import com.myframework.smhj.hibernate.dao.Service;
import com.yazi.mxz.common.entity.beans.Store;
import com.yazi.mxz.common.entity.beans.StoreRestock;
import com.yazi.mxz.common.entity.beans.StoreRestockGoods;

public interface StoreRestockService extends Service<StoreRestock> {
	
	
	/**
	 * 添加或者更新进货单
	 * @param store 店铺(游离对象)
	 * @param operator 操作人
	 * @param restock 进货单(构建对象)
	 * @param goodses 进货单商品(构建对象)
	 * @return
	 */
	StoreRestock addOrEditBystore(Store store, String operator, StoreRestock restock, 
			List<StoreRestockGoods> goodses) throws MyException;
	
	/**
	 * 进货单入库
	 * @param store 店铺(游离对象)
	 * @param restockId 进货单ID
	 * @param checker 入库人
	 * @return
	 */
	StoreRestock editToCheckedByStore(Store store, long restockId, 
			String checker) throws MyException;
	
	/**
	 * 删除进货单
	 * @param store 店铺(游离对象)
	 * @param restockId 进货单ID
	 */
	void removeByStore(Store store, long restockId) throws MyException;
}
